<template>
	<view class="page">
		<!-- 导航栏 -->
		<view class="navbar">
			<view class="navbar-content">
				<view class="back-button" @click="goBack">
					<uni-icons type="back" size="30" color="#ffff"></uni-icons>
				</view>
				<text class="navbar-title">优惠券中心</text>
			</view>
		</view>
		
		<!-- 蓝色背景区域 -->
		<view class="blue-background"></view>
		
		<!-- 主内容容器 -->
		<view class="main-content">
			<!-- 优惠券列表 -->
			<view class="coupon-list">
				<!-- 优惠券1 -->
				<view class="coupon-card">
					<image class="coupon-bg" src="/static/车联网服务-01专业洗车-05洗车-优惠券_slices/椭圆 3 拷贝.png" mode="aspectFill"></image>
					<view class="coupon-content">
						<view class="coupon-top">
							<view class="coupon-left">
								<text class="coupon-type">仅限于XX加油站使用</text>
								<text class="coupon-condition">满200元可用</text>
							</view>
							<view class="coupon-right">
								<text class="currency-symbol">¥</text>
								<text class="coupon-amount">20</text>
							</view>
						</view>
						<view class="coupon-bottom">
							<text class="validity-period">有效期至: 2020.04.11—2023.05.11</text>
							<text class="use-button">去使用 ></text>
						</view>
					</view>
				</view>
				
				<!-- 优惠券2 -->
				<view class="coupon-card">
					<image class="coupon-bg" src="/static/车联网服务-01专业洗车-05洗车-优惠券_slices/椭圆 3 拷贝.png" mode="aspectFill"></image>
					<view class="coupon-content">
						<view class="coupon-top">
							<view class="coupon-left">
								<text class="coupon-type">通用</text>
								<text class="coupon-condition">满200元可用</text>
							</view>
							<view class="coupon-right">
								<text class="currency-symbol">¥</text>
								<text class="coupon-amount">20</text>
							</view>
						</view>
						<view class="coupon-bottom">
							<text class="validity-period">有效期至: 2020.04.11—2023.05.11</text>
							<text class="use-button">去使用 ></text>
						</view>
					</view>
				</view>
				
				<!-- 优惠券3 -->
				<view class="coupon-card">
					<image class="coupon-bg" src="/static/车联网服务-01专业洗车-05洗车-优惠券_slices/椭圆 3 拷贝.png" mode="aspectFill"></image>
					<view class="coupon-content">
						<view class="coupon-top">
							<view class="coupon-left">
								<text class="coupon-type">仅限于XX加油站使用</text>
								<text class="coupon-condition">满200元可用</text>
							</view>
							<view class="coupon-right">
								<text class="currency-symbol">¥</text>
								<text class="coupon-amount">20</text>
							</view>
						</view>
						<view class="coupon-bottom">
							<text class="validity-period">有效期至: 2020.04.11—2023.05.11</text>
							<text class="use-button">去使用 ></text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			goBack() {
				uni.navigateBack();
			}
		}
	}
</script>

<style>
	.page {
		background-color: #f5f6fa;
		min-height: 100vh;
		position: relative;
	}
	
	/* 导航栏 */
	.navbar {
		width: 100%;
		height: 88rpx;
		background: linear-gradient(120deg, #1f78ff 0%, #2f89ff 100%);
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	.navbar-content {
		width: 100%;
		height: 100%;
		display: flex;
		align-items: center;
		position: relative;
		padding: 0 24rpx;
	}
	
	.back-button {
		position: absolute;
		left: 24rpx;
		width: 60rpx;
		height: 60rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	.navbar-title {
		color: #ffffff;
		font-size: 32rpx;
		font-weight: 600;
		text-align: center;
		width: 100%;
	}
	
	/* 蓝色背景区域 */
	.blue-background {
		position: absolute;
		top: 88rpx;
		left: 0;
		width: 100%;
		height: 250rpx;
		background: linear-gradient(120deg, #1f78ff 0%, #2f89ff 100%);
	}
	
	/* 主内容容器 */
	.main-content {
		position: absolute;
		top: 80rpx;
		left: 50%;
		transform: translateX(-50%);
		width: 94%;
		max-width: 750rpx;
		z-index: 10;
		padding: 20rpx 0;
	}
	
	/* 优惠券列表 */
	.coupon-list {
		display: flex;
		flex-direction: column;
		gap: 20rpx;
	}
	
	/* 优惠券卡片 */
	.coupon-card {
		position: relative;
		height: 220rpx;
		border-radius: 16rpx;
		overflow: hidden;
		margin: 0 10rpx;
	}
	
	.coupon-bg {
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;
		left: 0;
		z-index: 1;
	}
	
	.coupon-content {
		position: relative;
		z-index: 2;
		height: 80%;
		padding: 25rpx 30rpx 20rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	
	.coupon-top {
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
		flex: 1;
	}
	
	.coupon-left {
		display: flex;
		flex-direction: column;
		gap: 10rpx;
	}
	
	.coupon-type {
		color: rgba(255, 255, 255, 0.8);
		font-size: 24rpx;
	}
	
	.coupon-condition {
		color: #ffffff;
		font-size: 32rpx;
		font-weight: 600;
	}
	
	.coupon-right {
		display: flex;
		align-items: baseline;
		gap: 4rpx;
	}
	
	.currency-symbol {
		color: #ffffff;
		font-size: 28rpx;
		font-weight: 600;
	}
	
	.coupon-amount {
		color: #ffffff;
		font-size: 60rpx;
		font-weight: 700;
		line-height: 1;
	}
	
	.coupon-bottom {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding-top: 15rpx;
		border-top: 1rpx dashed rgba(255, 255, 255, 0.3);
		margin-top: 10rpx;
	}
	
	.validity-period {
		color: rgba(255, 255, 255, 0.8);
		font-size: 24rpx;
	}
	
	.use-button {
		color: rgba(255, 255, 255, 0.8);
		font-size: 24rpx;
		font-weight: 600;
	}
</style>
